define(function(require){
	var $=require("jq");
	function SwitchTab(tab){
		var _this_=this;
		//保存对象
		this.switchBox=tab;
		//保存tabs
		this.switchTabs=$("li.tab-switch",tab);
		//如果是窄版就绑定相关事件
		if(this.switchBox.css("marginLeft")=="455px"){
			this.switchTabs.hover(function(){
				var $this=this;
				window.clearTimeout(this.timer2);
				this.timer1=window.setTimeout(function(){
					_this_.show($this);
				},200);
			},function(){
				var $this=this;
				window.clearTimeout(this.timer1);
				this.timer2=window.setTimeout(function(){
					_this_.hide($this);
				},200);
			});
		}else{
			var tab = $("li.switch-h");
			var showDom = $(".switch-h .tab-switch-con");
				tab.hover(function() {
					showDom.hide();
					$(this).find(".tab-switch-con").show();
				},function(){
					
				});
		}	
	};
	SwitchTab.prototype={
		show:function(thisObj){
			$("div.tab-switch-con",thisObj).show();
		},
		hide:function(thisObj){
			$("div.tab-switch-con",thisObj).hide();
		}
	};
	new SwitchTab($("#daily-service-wrap"));
});